import Vue from 'vue'
import Vuex from 'vuex'
import main from './main/main'
import theater from './theater'
import calendar from './sFunc/calendar'
import cityList from './sFunc/city'
import show from './show_thx/show'
import detaillist from './detailList/main'
import detaillistb from './detailList/main'
// 引入每个影院 zlm
import pre from './pre'
Vue.use(Vuex)

export default new Vuex.Store({
    //ht
    state: {
        token: '',
    },
    actions: {
        setToken({ commit }, token) {
            sessionStorage.setItem('token', token)
            commit('setToken', token)
        }
    },
    mutations: {
        setToken(state, token) {
            state.token = token
        },
    },

    modules: {
        main,
        ...theater,
        calendar,
        cityList,
        show,
        detaillist,
        detaillistb,
        pre // zlm
    },
    // strict: process.env.NODE_ENV !== 'production'
})